$(function() {
	//余额
	balance({
		c_user_id:CD.geturl().business
	},function(data){
		$('#myBalance').html(data.data.balance)
	});
	
	$('#giveMyMoney').on('tap',function(){
		window.location.href = 'm-mypacket-cash.html?business='+CD.geturl().business;
	});
	
	$('#myTransaction').on('tap',function(){
		window.location.href = 'm-jiaoyijilu.html?business='+CD.geturl().business;
	});
});

//余额
var balance = function(params, callback) {
	$.ajax({
		type: "get",
		cache: false,
		traditional: true,
		dataType: "json",
		url: window.address + "/wechat/inte/seachInte",
		xhrFields: {
			withCredentials: true
		},
		crossDomain: true,
		data: params,
		success: function(data) {
			console.log(data);
			callback && callback(data);
		}
	});
}